1. Field of the Invention
The present invention relates to an electronic apparatus incorporating a reader/writer unit with a sub unit. The sub unit is detachably mounted to the electronic apparatus, and includes a wireless tag into which data can be written. The reader/writer unit is capable of supplying electric power to the wireless tag and communicating with the wireless tag.
2. Description of the Related Art
A conventional electronic apparatus incorporates a wireless tag in the form of a non-contact type memory device and a reader/writer unit. The reader/writer unit generates an alternating magnetic field through which electric power is supplied to the wireless tag and data can be written into the wireless tag and read (transfer) from the wireless tag.
One way of increasing the speed in serial transfer of data to the wireless tag is to employ a multi-valued signal by changing the drive voltage or the turns ratio of coils that generates the alternating magnetic field.
Multi-valued signals may also be implemented by employing frequency-modulation or phase-modulation in which no error in reading data occurs on a receiving end even when data is transmitted at high rates and when the distance between the wireless tag and the reader/writer unit fluctuates.
A writable wireless tag usually employs a memory in the form of a non-volatile memory. When data is written into a non-volatile memory, the data at a specified write-address in the memory is first cleared and then new data is written into the address.
For a wireless tag, a non-volatile memory receives electric power through an alternating magnetic field. When data is being written into the nonvolatile memory, if the non-volatile memory fails to receive the electric power for some reason, there is often the case in which data fails to be written shortly after the specified address in the non-volatile memory has been cleared. This occurs, for example, when power failure occurs or when the wireless tag and the reader/writer unit come apart, so that they can no longer communicate with each other normally.
In order to prevent corruption of data due to the fact that the alternating magnetic field fails to be received during a data write operation and prior to clearing of the specified address, the data may be copied into another address located in the non-volatile memory, and a hash value produced by using a hash function of the original data may be written into still another address located in the non-volatile memory. When the data is read from the specified address, the hash value is also read and an operation is performed to determine whether the data has been corrupted. If data corruption is detected, the corrupted data is recovered by using the backup copy of the original data.
However, the aforementioned conventional methods require an extra memory capacity for storing the backup portion and the hash value, necessitating an increase in the storage capacity of the non-volatile memory in the wireless tag. Another problem with the aforementioned conventional method is that when the data is read from the specified address, the hash value is also read from another address to detect data corruption. Therefore, this method takes a long time to read the data.